using System.Collections.Generic;
using static SmartSite.Common.CheckingNullArgument;

namespace SmartSite.Frame
{
    public class ValidationCodeField : IntField, IValueField<ValidationCodeEnum>
    {
        const int FieldCount = 8;
        public ValidationCodeField(List<byte> buffer, BitUnit index)
            : base(buffer, index, FieldCount) { }

        public ValidationCodeField(IBytesBuffer buffer, BitUnit index)
            : base(buffer, index, FieldCount) { }

        public ValidationCodeField(IField field)
            : base(field, FieldCount) { }

        public new ValidationCodeEnum Value
        {
            get => (ValidationCodeEnum)base.Value;
            set => base.Value = (int)value;
        }
    }
}